
@echo off

if "%ACTION%" == "stop" exit/b

if not exist %BUILDDIR% ( 
    echo build dir: %BUILDDIR%
    echo not exists: abort operation
    exit/b 
)

set vsvars1=C:\"Program Files (x86)\Microsoft Visual Studio 11.0"\Common7\Tools\vsvars32.bat
set vsvars2=C:\"Program Files\Microsoft Visual Studio 11.0"\Common7\Tools\vsvars32.bat

if exist %vsvars1% ( call %vsvars1% )
if exist %vsvars2% ( call %vsvars2% )

cd %BUILDDIR% 

if "%ACTION%" == "launch" ( devenv %NAME_PRODUCT%.sln 
) ELSE ( 
    echo [ ============================== ] mode action: %MODE%
    devenv %NAME_PRODUCT%.sln /%ACTION% "%MODE%" 
)
cd ..

exit /b


